package top.kpromise.user.service;

import top.kpromise.user.model.response.VerifyCodeModel;

import java.util.Date;
import java.util.Map;

public interface VerifyCodeService {

    void saveCode(String receiver, String code, int type);
    VerifyCodeModel findCode(String receiver, int type);
    void updateCode(String receiver, int type, String code, Date createAt);
    void delete(String receiver, int type);

    /**
     * @return return map if error or return null
     */
    Map<String, Object> checkVerifyCode(String receiver, String verifyCode, int type);
}
